package com.dsp.web;

import java.util.List;


import org.apache.log4j.Logger;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.core.util.DspUtil;
import com.dsp.bean.Province;
import com.dsp.services.ProvinceService;

@Controller("ProvincesController")
public class ProvincesController {
	
	Logger logger = Logger.getLogger(DspUtil.Log4J);

	@Autowired
	private ProvinceService provinceService;

	@RequestMapping(value = "/provinces_sss")
	@ResponseBody
	public List<Province> sss(){
		DetachedCriteria dc = DetachedCriteria.forClass(Province.class);
		List<Province> list = this.provinceService.likeBy(dc);
		return list;
	}

	/**
	 * @return the provinceService
	 */
	public ProvinceService getProvinceService() {
		return provinceService;
	}

	/**
	 * @param provinceService the provinceService to set
	 */
	public void setProvinceService(ProvinceService provinceService) {
		this.provinceService = provinceService;
	}
	
}
